package com.bang.ticket.controller;

import com.bang.ticket.service.HelloService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Auther: Bang
 * @Date: 2019/11/26 23:06
 * @Description:
 */
@RestController
public class HelloController {

    @Autowired
    private HelloService helloService;

    @GetMapping("/hello")
    public Object hello(@RequestParam("msg") String msg) {
        String sayHello = helloService.sayHello(msg);
        System.err.println(sayHello);
        return sayHello;
    }
}
